﻿using System.Collections.ObjectModel;
using Core.AbstractEntities;
using Core.Interfaces;

namespace Collection.AbstractEntities
{
    /// <summary>
    /// Collection of items
    /// </summary>
    public abstract class HpCollection : ObservableCollection<HpElement>, IHpPile
    {
        #region IHpPile Members

        /// <summary>
        /// Add element to the list
        /// </summary>
        /// <param name="element">element to add</param>
        public abstract void AddElement(HpElement element);

        /// <summary>
        /// Send the element
        /// </summary>
        /// <param name="index">Position of the element in the list</param>
        /// <returns>An element</returns>
        public HpElement Get(int index)
        {
            return this.Items[index];
        }

        #endregion
    }
}
